import React from 'react'
import PropTypes from 'prop-types'

const Counter = ({count, increaseClick, reduceClick}) => {
    return (
        <div>
            <span>{count}</span>

            <button onClick={increaseClick}>+</button>
            <button onClick={reduceClick}>-</button>
        </div>
    )
}

Counter.propTypes = {
    count: PropTypes.number.isRequired,
    increaseClick: PropTypes.func.isRequired,
    reduceClick: PropTypes.func.isRequired,
}
export default Counter